<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" >
<head>
	<th:block th:include="include :: header('修改仓库设置')" />
</head>
<body class="white-bg">
    <div class="wrapper wrapper-content animated fadeInRight ibox-content">
        <form class="form-horizontal m" id="form-wareInfo-edit" th:object="${wareInfo}">
            <input id="wareId" name="wareId" th:field="*{wareId}"  type="hidden">
			<div class="form-group">	
				<label class="col-sm-3 control-label">仓库编码：</label>
				<div class="col-sm-8">
					<input id="wareCode" name="wareCode" th:field="*{wareCode}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">	
				<label class="col-sm-3 control-label">仓库名：</label>
				<div class="col-sm-8">
					<input id="wareName" name="wareName" th:field="*{wareName}" class="form-control" type="text">
				</div>
			</div>

			<!--<div class="form-group">
				<label class="col-sm-3 control-label">备注:</label>
				<div class="col-sm-8">
					<input id="memo" name="memo" th:field="*{memo}" class="form-control" type="text">
				</div>
			</div>-->
			<div class="form-group">
				<label class="col-sm-3 control-label">爆仓预警:</label>
				<div class="col-sm-8">
					<input id="expectedWaring" name="expectedWaring" th:field="*{expectedWaring}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">爆仓报警:</label>
				<div class="col-sm-8">
					<input id="alarm" name="alarm" th:field="*{alarm}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">呆滞过期预警(天):</label>
				<div class="col-sm-8">
					<input id="stockWaring" name="stockWaring" th:field="*{stockWaring}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">物料数量框中占比上限:</label>
				<div class="col-sm-8">
					<input id="boxParam" name="boxParam" th:field="*{boxParam}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">单箱可储存高度(毫米):</label>
				<div class="col-sm-8">
					<input id="boxHeight" name="boxHeight" th:field="*{boxHeight}" class="form-control" type="text">
				</div>
			</div>
			<div class="form-group">
				<label class="col-sm-3 control-label">不合格物料存储天数(天):</label>
				<div class="col-sm-8">
					<input id="unqualifiedStorageDay" name="unqualifiedStorageDay" th:field="*{unqualifiedStorageDay}" class="form-control" type="number">
				</div>
			</div>
		</form>
    </div>
    <div th:include="include::footer"></div>
    <script type="text/javascript">
		var prefix = ctx + "system/wareInfo";
		$("#form-wareInfo-edit").validate({
			onkeyup: false,
			rules:{
				wareCode:{
					required:true,
				},
				wareName:{
					required:true,
				},
				expectedWaring:{
					required:true,
				},
				alarm:{
					required:true,
				},
				stockWaring:{
					required:true,
				},
				boxParam:{
					required:true,
				},
				boxHeight:{
					required:true,
				},
				unqualifiedStorageDay:{
					required:true,
				},
			},
			messages: {
				"wareCode": {
					required: "请输入仓库编码"
				},
				"wareName":{
					required: "请输入仓库名称",
				},
				"expectedWaring":{
					required: "请输入爆仓预警",
				},
				"alarm":{
					required: "请输入爆仓报警",
				},
				"stockWaring":{
					required: "请输入滞库预警天数",
				},
				"boxParam":{
					required: "请输入物料数量框中占比上限",
				},
				"boxHeight":{
					required: "请输入单箱高度",
				},
				"unqualifiedStorageDay":{
					required: "请输入不合格物料存储天数",
				},
			},
			focusCleanup: true
		});
		
		function submitHandler() {
	        if ($.validate.form()) {
	            $.operate.save(prefix + "/edit", $('#form-wareInfo-edit').serialize());
	        }
	    }
	</script>
</body>
</html>
